package com.business.api;

import com.business.config.FeignConfig;
import com.business.fallback.TestApiFallbackImpl;
import com.comm.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author mis_wu
 * @date 2022/6/18 15:13
 * @TODO testApi
 * 注解: @FeignClient(value = "cloud-serve",path = "/test",url = "<a href="http://localhost:10010/cloud-server">http://localhost:10010/cloud-server</a>",fallbackFactory = TestApiFallbackImpl.class)
 * url: http://localhost:10010/cloud-server
 */
@FeignClient(value = "cloud-server-app-mis-wu",contextId = "businessTestBack",fallbackFactory = TestApiFallbackImpl.class,configuration = FeignConfig.class)
@RequestMapping("/test")
public interface TestApi {

    @GetMapping("/testFeign")
    ResponseResult<Object> testFeign(@RequestParam String name);

    /**
     * 测试多数据源 默认数据源 指定库
     * @param param param
     * @return string
     */
    @GetMapping("/testDynamicSlave1")
    String testDynamicSlave1(String param);

}
